package com.project.UI;

import java.util.ArrayList;
import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.example.VolleyActivity;
import com.example.mybaseproject.R;
import com.project.baseApp.BaseActivity;

public class MainActivity extends BaseActivity implements OnItemClickListener {
	private ListView mainLV;
	private List<Class> list = new ArrayList<Class>();

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);

		setContentView(R.layout.main_layout_activity);
		mainLV = (ListView) findViewById(R.id.main_listview);
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_2,
				R.array.main_list);
		mainLV.setAdapter(adapter);
		mainLV.setOnItemClickListener(this);

		list.add(VolleyActivity.class);
	}

	@Override
	public void onItemClick(AdapterView<?> arg0, View v, int position, long id) {
		Intent intent = new Intent(this, list.get(position));
		startActivity(intent);
	}
}
